package com.example.graphicslib.animations;

import com.example.graphicslib.utils.RotationDirection;

/**
 * Created by Tatev on 24/4/2014.
 */
public class BaseRotationFrameAnimation extends BaseRotationAnimation implements Framable {
    public BaseRotationFrameAnimation(int rotationCount, RotationDirection direction,
                                      float width, float height, long duration,
                                      int maxFrameCount) {
        super(rotationCount, direction, width, height, duration);
        frameAnimation = new BaseFrameAnimation(maxFrameCount, duration);
    }

    @Override
    public void setFps(int fps) {
        frameAnimation.setFps(fps);
    }

    @Override
    public void onTickResponse(long elapsedTime) {
        super.onTickResponse(elapsedTime);
        frameAnimation.onTickResponse(elapsedTime);
    }

    @Override
    public int getCurrentFrame() {
        return frameAnimation.getCurrentFrame();
    }

    private BaseFrameAnimation frameAnimation;
}
